import React from 'react'
import { Button } from 'antd';

class Home extends React.Component{

    constructor(props){
        super(props);
        this.state = {
            flag:true
        }
    }

    clickFlag = () =>{
        this.setState({ flag:!this.state.flag })
    }

    render(){
        let text = this.state.flag ?'美少女':'丑八怪'
        return (
            <div>
                <h1> 今天周四!!! </h1>
                <p>{ text }</p>
                <button onClick={ this.clickFlag } > 猜猜我是谁！ </button>
                <Button type="primary" > Button </Button>
            </div>

            
        )
    }
}

export default Home